<?php

namespace App\Http\Controllers\Blog;

use App\Http\Controllers\Controller;
use App\Http\Requests\CommentSaveRequest;
use App\Http\Responses\Response;
use App\Models\Comment;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;

class CommentController extends Controller
{
    public function save(CommentSaveRequest $request): JsonResponse
    {
        $comment = Comment::create($request->validated());
        return Response::insert_success($comment);
    }

}
